package com.jgy.init;

import com.jgy.service.DpTemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 启动项目自动初始化模板
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class DpTemplateInit implements ApplicationRunner {

    final DpTemplateService dpTemplateService;

    @Override
    public void run(ApplicationArguments args) {
        dpTemplateService.init();
    }
}